import os
class Config:
    SECRET_KEY='34jdlsjifesyteosjkfkdjfgoe'
    Hostname = '127.0.0.1'
    port = 3306
    database = 'security-blog-system'
    username = 'root'
    password = '123456'
    SQLALCHEMY_DATABASE_URI = f'mysql+pymysql://{username}:{password}@{Hostname}:{port}/{database}?charset=utf8mb4'
    SQLALCHEMY_TRACK_MODIFICATIONS = False

    MAIL_SERVER = 'smtp.qq.com'
    MAIL_USE_SSL = True
    MAIL_PORT = 465
    MAIL_USERNAME = '1054899139@qq.com'  # 替换
    MAIL_PASSWORD = 'kazakudmxrsibfdf'  # 替换
    MAIL_DEFAULT_SENDER = '1054899139@qq.com'  # 替换

    UPLOAD_FOLDER = os.path.join(os.path.dirname(__file__), '', 'static', 'uploads')
    COVER_FOLDER = os.path.join(os.path.dirname(__file__), 'static', 'uploads', 'covers')
